<link rel="stylesheet" type="text/css" media="all" href="/css/colorbox.css">
	<script src="/js/jquery.js"></script>
	<script src="/js/jquery.colorbox.min.js"></script>
		<div class="container_12">
		<div class="grid_12 ambientes">
		<?php $contador = 1;?>
		<?php foreach($this->fotos as $galeria):?>
		<?php if($contador == 1):?>
			<div class="imageRow">
		<?php endif;?>
		<?php if($contador == 4):?>
		  </div>
		  <?php $contador = 0;?>
		<?php endif;?>
			<div class="single">
			<div class="ambiente">
					<?php $imagem = 'galeria_fotos/thumbs/'. $galeria['id_foto'] . '.jpg';?>
						<?php if(file_exists($imagem)):?>
						<a title="<?php echo $galeria['descricao'];?>" href=<?php echo 'http://' . $_SERVER['HTTP_HOST'] . '/galeria_fotos/'. $galeria['id_foto'] . '.jpg'; ?> class="gallery"><img  width="200" src=<?php echo 'http://' . $_SERVER['HTTP_HOST'] . '/galeria_fotos/thumbs/'. $galeria['id_foto'] . '.jpg'; ?> alt="<?PHP echo $galeria['descricao']; ?>" /></a>
						<?php else:?>
						<a title="<?php echo $galeria['descricao'];?>" href=<?php echo 'http://' . $_SERVER['HTTP_HOST'] . '/galeria_fotos/sem-foto.gif'; ?> class="gallery"><img width="200" src=<?php echo 'http://' . $_SERVER['HTTP_HOST'] . '/galeria_fotos/sem-foto.gif'; ?> alt="<?PHP echo $galeria['descricao']; ?>" /></a>
						<?php endif;?>
			<?php echo $galeria['descricao'];?>
			</div>
			</div>
		<?php $contador++;?>
		<?php endforeach;?>
	
	</div>
	</div>
	<div class="clear"></div>
	<script>
	$('.single a').colorbox({rel:'gal'});
	</script>

	
	